JavaScript
A5.Buttoncreate Method
Syntax
A5.Button.create([attributes])
Arguments
- attributesobject
Attributes to add to the newly created button. The names of the properties in the object will be used as the attribute names, the values will be used for the value of the given attribute.
Returns
- buttonelement
The created BUTTON element.
Description
Create and automatically bind a BUTTON element.
Example
// assume "saveButton" is an A5.Button, and "cEle" is an element in which the new button wants to be added. var bEle = saveButton.create({index: '3'}); // "bEle" is a new BUTTON element that is bound to "saveButton" and has an attribute of "index" with a value of "3". cEle.appendChild(bEle);